{ "name": "Collision Detection", "script": "Collision Detection.js", "version": "2.2", "previousversions": ["2.1", "2.0", "1.0"], "description": "Watches for collisions between player-controlled tokens and a specified subset of path objects. When a collision is detected, the script may return the token to its position prior to the move, send a warning message to the token's controller, and/or halt the token at the path acting as a barrier to movement, depending on settings.", "authors": "Brian Shields", "roll20userid": "235259", "patreon": "https://www.patreon.com/bshields", "useroptions": [ { "name": "Path Color", "type": "text", "default": "#ff00ff", "description": "The script only considers path objects of a specific color, allowing you to also use paths of other colors which your players will not collide with. By default, this is fuchsia (#ff00ff); the color is specified as a hexadecimal web color, which you can see when selecting a color from the drawing interface. A path's fill color is ignored." }, { "name": "Layer", "type": "select", "options": ["all", "walls", "gmlayer", "objects", "map"], "default": "walls", "description": "The script will only look at paths on the specified layer. You can also set this value to \"all\" and paths on every layer will be considered." }, { "name": "Behavior", "type": "select", "options": ["Don't Move", "Warn Player", "Stop at Wall", "Don't Move & Warn Player", "Warn Player & Stop at Wall"], "default": "Warn Player & Stop at Wall", "description": "You can customize the script's behavior when a collision event is detected. \"Don't Move\" will return the token to its original position if it collides with something. \"Warn Player\" will send the player a mesasge indicating that they aren't supposed to be able to move there. \"Stop at Wall\" will halt the token at the wall." } ], "dependencies": [], "modifies": { "token.subtype": "read", "token.left": "read,write", "token.top": "read,write", "token.represents": "read", "token.controlledby": "read", "character.controlledby": "read", "character.name": "read", "player.displayname": "read", "path.pageid": "read", "path.stroke": "read", "path.layer": "read", "path.path": "read", "path.left": "read", "path.top": "read", "path.width": "read", "path.height": "read", "Campaign.playerpageid": "read" }, "conflicts": [] }